package com.lt.flashcard.model.entity;

import java.util.Date;

import org.bson.types.ObjectId;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Reference;

/**
 * User gains medal
 * @author ocsen
 *
 */
@Entity(value="medalhistory", noClassnameStored=true)
public class MedalHistory {
	
	@Id
	private ObjectId id;
	
	private Date created = new Date();
	
	@Reference
	private Medal medal; //The user that got this medal
	
	private Long userid;
	
	private String note = "";
	
	public ObjectId getId() {
		return id;
	}
	
	public void setId(ObjectId id) {
		this.id = id;
	}
	
	public Date getCreated() {
		return created;
	}
	
	public void setCreated(Date created) {
		this.created = created;
	}
	
	public Medal getMedal() {
		return medal;
	}
	
	public void setMedal(Medal medal) {
		this.medal = medal;
	}

	public Long getUserid() {
		return userid;
	}

	public void setUserid(Long userid) {
		this.userid = userid;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}
}
